//package com.dada.config;
//
//import com.dada.base.registry.consumer.impl.DiscoveryServiceImpl;
//import com.google.common.collect.Lists;
//import com.google.common.collect.Maps;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.util.List;
//import java.util.Map;
//
///**
// * Created by jianweilin on 16/9/5.
// */
//@Slf4j
//@Configuration
//public class DiscoveryServiceConfig {
//
//    @Value("${discovery.service.zkHosts}")
//    private String zkHosts;
//
//    @Value("${discovery.service.connectionTimeoutMills}")
//    private Integer connectionTimeoutMills;
//
//    @Value("${discovery.service.localRegistrySwitch}")
//    private Boolean localRegistrySwitch;
//
//    @Value("${discovery.service.localRegistryApps}")
//    private String localRegistryApps;
//
//
//    @Bean
//    public DiscoveryServiceImpl discoveryService() {
//        log.info("zkHosts  == >" + zkHosts);
//        DiscoveryServiceImpl service = new DiscoveryServiceImpl();
//        service.setZkHosts(zkHosts);
//        service.setConnectionTimeoutMills(connectionTimeoutMills);
//        service.setLocalRegistrySwitch(localRegistrySwitch);
//        service.setLocalRegistryApps(localRegistryApps);
//        Map<String,List<String>> map = Maps.newHashMap();
//
//        List<String> modelserviceServiceList = Lists.newArrayList();
//        modelserviceServiceList.add("get.deliver.exist");
//
//        List<String> searchServiceList = Lists.newArrayList();
//        searchServiceList.add("bd.supplier_verify_task.search");
//
//        map.put("basic-service-0.2.0",modelserviceServiceList);
//        map.put("search-service",searchServiceList);
//        service.setServices(map);
//        return service;
//    }
//}
